During application code debugging, it is desirable for a target hardware platform to provide a hardware debug-support feature that enables code flow tracing information to be obtained during execution of the application code. An important aspect of such a hardware debug-support feature is that it does not affect (or minimally affects) the execution of the application code being debugged. Consequently, use of the primary resources and functionality of the hardware architecture by such a hardware debug-support feature should be minimal.
In high-end hardware architectures, it is known for such hardware debug-support to comprise either a dedicated trace buffer for storing code flow trace information obtained during execution of the application code for later access, or to comprise a fast access, for example via a high-speed connection, to an external trace memory (with a very small FIFO-buffer) whereby the code flow trace information obtained during execution of the application code may be offloaded to the external trace memory in real-time.
However, for cost sensitive devices such dedicated trace buffers and/or high-speed connections to external trace memory are prohibitively expensive to implement, and take up valuable die area. Conventionally, if no dedicated trace buffer or high-speed connection is available, code flow tracing information obtained during execution of the application code has to be stored in system-memory, which is then no longer available to the application code being debugged and thus can have an effect on the execution of the application code being debugged.